package layers
{
	/**
	 * 后景
	 * wuxi create on 2012-11-21 17:20:05
	 * */
	import data.EffectAvatar;
	
	import engine.animation.AnimationClip;
	
	import flash.display.DisplayObject;
	import flash.events.Event;
	
	import mx.core.UIComponent;
	
	public class BackLayer extends UIComponent
	{
		public function BackLayer()
		{
			super();
			this.addEventListener(Event.ENTER_FRAME,onEnterFrame);
		}
		
		private function onEnterFrame(event:Event):void{
			
			var numChild:int = this.numChildren;
			for(var i:int = 0; i < numChild; i++){
				var avatar:DisplayObject = this.getChildAt(i);
				if(avatar is engine.animation.AnimationClip){
					AnimationClip(avatar).onFrame();
				}
			}
			
		}
	}
}